{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=120
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	i,n:longint;
	ans,k:extended;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n);
ans:=2;
k:=1;
for i:=2 to min(n,30) do begin
	k:=k*int64(i);
	ans:=ans+1/k;
end;
write(ans:0:9);
end.